import request from '@/utils/request'
/**
 * 分页获取所有模板
 * */

export function getGoodsPageList(data){
  return request({
    url: 'goods/getGoodsPageList',
    method: 'post',
    data: data
  })
}


/**
 * 增加模板
 * */

export function saveGoods(data){
  return request({
    url: 'goods/saveGoods',
    method: 'post',
    data: data
  })
}
/**
 * 单位模板
 * */

export function getGoodsDetails(data){
  return request({
    url: 'goods/getGoodsDetails',
    method: 'post',
    data: data
  })
}
/**
 * 编辑模板
 * */

export function updateGoods(data){
  return request({
    url: 'goods/updateGoods',
    method: 'post',
    data: data
  })
}

/**
 * 删除模板
 * */


export function deleteGoods(data){
  return request({
    url: 'goods/deleteGoods',
    method: 'post',
    data: data
  })
}

// 获取二级分类

export function getSonCategoryByParent(data){
  return request({
    url: 'category/getSonCategoryByParent',
    method: 'post',
    data: data
  })
}

// 下单
export function saveOrder(data){
  return request({
    url: '/order/saveOrder',
    method: 'post',
    data: data
  })
}

// 获取地址
export function getWholesaleBuyStatusAll(data){
  return request({
    url: '/buy/getWholesaleBuyStatusAll',
    method: 'post',
    data: data
  })
}

// 批量添加商品
export function batchSaveGoods(data){
  return request({
    url: '/goods/batchSaveGoods',
    method: 'post',
    data: data
  })
}

